package com.renjiyue.Day1;

public class Animal {
    public Animal(){}

    public Animal(String name){
        this.name = name;
    }

    private String name;
    private int age;
    private int weight;

    public String toString(){
        return "name:" + name;
    }

    protected void speak(){
        System.out.println("叫");
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }
}
